Japanese and Chinese texts, as well as some other language texts, contain base characters and annotation characters. Ruby characters in Japanese are one specific example of such annotation characters. Annotation characters also exist in other languages. Ruby characters are smaller characters that explain the pronunciation or meaning of the base characters, such as for obscure or difficult base characters. Ruby characters can be an important part of such texts. For example, ruby characters in Japanese text can serve as reading aids for children or foreigners learning to read Kanji characters in Japanese.
Electronic readers, or eReaders, display electronic documents, such as eBooks, on a screen or other display and attempt to provide benefits of both a digital document and a print document. For example, many eReaders allow for different size fonts and can reflow text in an eBook to fill the screen of the eReader. Flowing and reflowing text refers to the arrangement of characters in lines on the display of an eReader, such that as the font size of the text changes, the lines of characters, the quantity of characters, and the positioning of the characters displayed are adjusted accordingly to fit the desired area on the display. Reflowing text can cause issues with ruby characters where the ruby characters are separated from their base characters on a different line or a different page, or part of a group of ruby characters flows to a new line and others do not, and so forth.
Traditional approaches to flowing and reflowing text in an eReader scenario typically consider word, line, or paragraph boundaries, and may not handle ruby characters correctly when flowing text.